#ifndef TESSERACTTOOL_H
#define TESSERACTTOOL_H

#include "config.h"
#include "anim.h"

#include <QObject>
#include <QProcess>
#include <QDebug>
#include <QApplication>
#include <QString>
#include <QThread>


//----------------------------------------------------------------------------------------

class Tesseract : public QObject
{
    Q_OBJECT

private:
    QStringList m_resultFileList;
    Anim* m_anim;
    QProcess* m_process;
    int m_processCount;

    bool m_processError;
    bool m_cancelled;

public:
    explicit Tesseract (QObject *parent);
    ~Tesseract () { }
    void runOCROn (QStringList const &sourceFileNames);

private slots:
    void onProcessFinished(const int code);
    void cancelAnalysis ();

signals:
    void endOfOCR (QStringList);

};
//-------------------------------


#endif // TESSERACTTOOL_H

